Fedora 27
Sponsored Link

Samba AD DC : Basic User Management
2017/12/18
 
This is the basic user management for Samba4 Active Directory Domain Controller.
[1] Display domain users list.
[root@smb ~]#
samba-tool user list

Administrator
Guest
krbtgt
fedora
redhat
[2] Add a domain user.
[root@smb ~]#
samba-tool user create fedora

New Password:    
# set password

Retype Password:
User 'fedora' created successfully
# see many other options with [samba-tool user create --help]
[3] Delete a domain user.
[root@smb ~]#
samba-tool user delete fedora

Deleted user fedora
[4] Reset password for a user.
[root@smb ~]#
samba-tool user setpassword fedora

New Password:
Changed password OK
[5] Set expiry for a user.
[root@smb ~]#
samba-tool user setexpiry fedora --days=7

Expiry for user 'fedora' set to 7 days.
[6] Disable/Enable user account.
[root@smb ~]#
samba-tool user disable fedora
[root@smb ~]#
samba-tool user enable fedora

Enabled user 'fedora'
[7] Display domain groups list.
[root@smb ~]#
samba-tool group list

Allowed RODC Password Replication Group
Enterprise Read-Only Domain Controllers
Denied RODC Password Replication Group
...
...
DnsAdmins
Guests
Users
[8] Display members in a group.
[root@smb ~]#
samba-tool group listmembers "Domain Users"

krbtgt
fedora
redhat
Administrator
[9] Add a domain group.
[root@smb ~]#
samba-tool group add ServerWorld

Added group ServerWorld
# see many other options with [samba-tool group add --help]
[10] Delete a domain group.
[root@smb ~]#
samba-tool group delete ServerWorld

Deleted group ServerWorld
[11] Add/remove a member from a domain group.
[root@smb ~]#
samba-tool group addmembers ServerWorld fedora

Added members to group ServerWorld
[root@smb ~]#
samba-tool group removemembers ServerWorld fedora

Removed members from group ServerWorld
 
Tweet